<?php
error_reporting(E_ALL & ~E_NOTICE);
session_set_cookie_params(12000);
session_start();
define('ROOT_PATH', './');
define('CORE_PATH', ROOT_PATH.'core/');
$XAJAX_DIR = 'adagps.com/scripts/xajax';
require_once(CORE_PATH.'classes/xajax/xajax.inc.php');
$objXajax = new xajax();
$objXajax->bDebug = false;
$objXajax->bWaitCursor = true;
$objXajax->bCleanBuffer = true;
$objXajax->statusMessagesOn();
//$objXajax->registerFunction('ajxCheckCaptcha');

// Registry ajax function
$objXajax->processRequests();
$tplXajaxScript = $objXajax->getJavascript($XAJAX_DIR);

$action = isset($_POST['action']) ? trim($_POST['action']) : '';

//var_dump($_COOKIE);
if(IsLogin()){
    Redirect('index.php');
}
if($action == "login"){
    //=======================================================
    global $objTemplate, $arrConfig,$objDbSelect,$objDbUpdate,$maxNoActivity;
    // Kiem tra neu la phuong thuc POST thi xu ly login
    // echo '<pre>';
    // print_r($_POST); die();
    $sHideMethod = isset($_POST['hide_method']) ? $_POST['hide_method'] : 'none';
    $cookie_user = isset($_COOKIE["adagps_user"]) ? $_COOKIE["adagps_user"]:"";
    $cookie_pass = isset($_COOKIE["adagps_pass"])  ? $_COOKIE["adagps_pass"]:"";
    $cookie_auto = isset($_COOKIE["adagps_auto"])   ? $_COOKIE["adagps_auto"]:"";
    $cookie_remember = isset($_COOKIE["adagps_remember"]) ? $_COOKIE["adagps_remember"]:"";
    $cookie_flag =isset($_COOKIE['adagps_flag']) ? $_COOKIE['adagps_flag'] : '';
    $userDisplay='';
    $passDisplay='';
    $rememberDisplay =0;
    $autoDisplay =0;
    $timeSave = time()+3600*30;

//    if($sHideMethod == 'login'||($cookie_user!='' && $cookie_pass!='' && $cookie_auto==1&&$cookie_flag==1))
//    {  

    $sUserName = isset($_POST['txtUserNameLogin']) ? $_POST['txtUserNameLogin'] : $cookie_user;
    $sPass = isset($_POST['txtPasswordLogin']) ? $_POST['txtPasswordLogin'] : $cookie_pass;
    // Them dau thoat vao truoc cac ky tu dac biet
    $sUserName = MyAddSlashes($sUserName);

    // Query du lieu tu database
    $sPassEn = MyAddSlashes(EncryptPass($sPass));

    $sSqlString =  " select u.*,h.name as hotel_name,h.id as tbl_postfix,h.id as hotel_id,h.active as hotelActive,pt.flg_cus
        ,h.expire_date from tbl_user as u join tbl_power_type as pt on u.power_type_id = pt.id left join tbl_service as h on u.hotel_id = h.id WHERE u.username = '$sUserName' 
        and u.pass = '$sPassEn' and u.active = $sys_active";

    $rsResult = $objDbSelect->GetArray($sSqlString);

    if(!is_array($rsResult))
    {            // Loi khi query
        MsgBox1(CONNECT_DB_ERR);
        $bLogin = 0;
        Redirect(ROOTURL.'?m=login');
        exit();
    }
    elseif(count($rsResult)==0)
    {

        // User khong ton tai
        setcookie('adagps_flag',0,$timeSave);
       AlertAndGo('Đăng nhập thất bại, vui lòng thử lại',ROOTURL.'?m=login');
       // Redirect(ROOTURL.'?m=login');
      // exit();
    }
    else
    {
        // them phan nho pass va tu dong dang nhap
        $now = date('Y-m-d').' 23:59:59';
        if($sHideMethod == 'login'){

            $cookie_auto = isset($_POST['chkAutoLogin'])?1:0;
            $cookie_remember = isset($_POST['chkRemember'])?1:0;
            if($cookie_auto==1||$cookie_remember==1){
                $cookie_user = $_POST['txtUserNameLogin'];
                $cookie_pass = $_POST['txtPasswordLogin'];
                $cookie_flag = $cookie_remember;
            }else{
                $cookie_user = '';
                $cookie_pass = '';
            }
        }
        if($cookie_remember==1){
            setcookie('adagps_flag',$cookie_flag,$timeSave);
            setcookie('adagps_user',$cookie_user,$timeSave);
            setcookie('adagps_pass',$cookie_pass,$timeSave);
            setcookie('adagps_auto',$cookie_auto,$timeSave);
            setcookie('adagps_remember',$cookie_remember,$timeSave);
        } else
        {
            setcookie('adagps_flag','',$timeSave);
            setcookie('adagps_user','',$timeSave);
            setcookie('adagps_pass','',$timeSave);
            setcookie('adagps_auto','',$timeSave);
            setcookie('adagps_remember','',$timeSave);

        }

        // them phan nho pass va tu dong dang nhap
        if($rsResult[0]['hotelActive']=='0'){
            Alert('Bạn bị khóa dịch vụ web, vui lòng liên hệ đại lý.');
        }elseif($rsResult[0]['expire_date'] < $now && ($rsResult[0]['power_type_id']==POWER_CUSTOMER||$rsResult[0]['power_type_id']==POWER_SUB_CUSTOMER) ){
            Alert('Bạn đã hết hạn sử dụng dịch vụ,Vui lòng liên hệ đại lý hoặc số điện thoại như trên');
        }else{
            $_SESSION['islogin']=1;
            $_SESSION['current']['user_id']  =  $rsResult[0]['id'];
            $_SESSION['current']['flg_cus']  =  $rsResult[0]['flg_cus'];
            $_SESSION['current']['user_name']  =  $rsResult[0]['username'];
            $_SESSION['current']['power_type_id']  =  $rsResult[0]['power_type_id'];
            $_SESSION['current']['hotel_id']  =  $rsResult[0]['hotel_id'];
            $_SESSION['current']['hotel_name']  =  $rsResult[0]['hotel_name'];
            $_SESSION['current']['level']  =  $rsResult[0]['level'];
            $_SESSION['current']['tbl_postfix'] = $rsResult[0]['tbl_postfix']==''?'':'_'.$rsResult[0]['tbl_postfix'];
            
/*            if($rsResult[0]['power_type_id']==POWER_CUSTOMER||$rsResult[0]['power_type_id']==POWER_SUB_CUSTOMER){
                $sqlservice = "select service_type,`level` as leveluse from tbl_service_detail where service_id = '".$rsResult[0]['tbl_postfix']."'";
                $arrservice = $objDbUpdate->GetArray($sqlservice);
                $count  = count($arrservice);
                if($count>1){
                    $_SESSION['current']['display']= '';
                }else{
                    $_SESSION['current']['display']= 'none';
                }
                for($i=0;$i<$count;$i++){
                    $_SESSION['current']['service_type'][$arrservice[$i]['service_type']]=$arrservice[$i]['leveluse'];
                }
            }*/
             
        }
        Redirect('index.php') ;

    }
}

//function ajxCheckCaptcha($value = '') {
//	include_once('./securimage/securimage.php');
//	$securimage = new Securimage();
//	$objResponse = new xajaxResponse();

//	if(!$securimage->check($value)) {
// Captcha sai
//		$objResponse->addAlert('Mã bảo mật không chính xác!');
//		$objResponse->addScript('vcode.focus();');
//	} else {
// Captcha dung
//		$objResponse->addScript('document.getElementById("loginForm").submit();');
//	}
//	
//	return $objResponse->getXML();
//}
$result="";
function Alert($message)
{
    $result =   '<script language="javascript" type="text/javascript">' . "alert('$message');</script>";

}

function AlertAndGo($message,$urlgo)
{
    $result =   '<script language="javascript" type="text/javascript">' . "alert('$message');window.location='$urlgo';</script>";
 echo $result;
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

<style type="text/css">


    body {
        font-family: Tahoma;
        font-size: 11px;
        margin-top: 0;
    }
    .dv_main {
        width: 800px;
    }
    .dv_main_header_tddv {
        border-top: 1px solid #65A4DA;
        height: 90px;
        padding-left: 2px;
        text-align: left;
    }
    .dv_main_header {
        height: 150px;
    }
    .dv_main a, .dv_main a:link, .dv_main a:visited {
        color: #393D40;
        text-decoration: none;
    }
    .dv_main a:hover, .dv_main a:focus {
        color: #FF7D00;
        font-weight: bold;
        text-decoration: none;
    }
    .dv_main_menu_tddv {
        border-bottom: 5px solid #65A4DA;
        height: 2px;
        text-align: left;
    }
    .dv_main_menu {
        border-bottom: 1px solid #FF7D00;
        height: 30px;
        text-align: left;
    }
    .dv_main_menu_list {
        float: left;
        margin-top: 10px;
        width: 600px;
    }
    .dv_main_menu_lang {
        float: right;
        margin-top: 10px;
        text-align: right;
        width: 120px;
    }
    .menu_item {
        text-align: center;
    }
    .border_right {
        border-right: 1px solid #CFCFCF;
    }
    .border_right_magiwan {
        border-right: 1px solid #FF740B;
    }
    .none_underline {
        text-decoration: none;
    }
    .image_flag {
        border: medium none;
        cursor: pointer;
        height: 16px;
        width: 19px;
    }
    .clear_both {
        clear: both;
    }
    .dv_main_footer {
        border-top: 1px solid #FF7D00;
        height: 7px;
        margin-top: 5px;
    }
    .dv_main_footer_g {
        margin-top: 5px;
        width: 50%;
    }
    .dv_main_footer_l {
        float: left;
        text-align: left;
    }
    .dv_main_footer_r {
        float: right;
        text-align: right;
    }
    .text_left {
        text-align: left;
    }
    .text_right {
        text-align: right;
    }
    .dv_main_body {
        margin-top: 5px;
        text-align: center;
    }
    .login_button1 {
        background-color: #D7F1F9;
        border-color: #1E9016;
        border-right: 1px solid #1E9016;
        border-style: solid;
        border-width: 1px;
        color: #000000;
        cursor: pointer;
        font-family: Verdana;
        font-size: 12px;
        font-weight: bold;
        height: 22px;
        padding-bottom: 3px;
        text-decoration: none;
        width: 110px;
    }
    button.login_button1:hover, .login_button1:hover {
        background-color: #86E17A;
        color: #FFFFFF;
        cursor: pointer;
    }

    .adslider
    {
        position: fixed;
        bottom: 25px;
        right: 0;
        width: 360px;
        height: 150px;
        border: 3px solid #7f7f7f;
    }




    #login111 {
        background: url("adagps.com/images/bglogin_magiwan.png") no-repeat scroll center top rgba(0, 0, 0, 0);
        margin: auto;
    }
    #login_title {
        color: #F15C22;
        font-family: Arial;
        font-size: 17px;
        font-weight: bold;
    }
    #support_title {
        color: #FF7D00;
        font-size: 14px;
        font-weight: bold;
    }
    .support_sub_title {
        color: #828382;
        font-size: 11px;
        font-weight: bold;
    }
    .support_add_title {
        color: #828382;
        font-size: 10px;
        font-weight: bold;
    }
    .submenu_title {
        font-size: 15px;
        font-weight: bold;
    }
    .tbl_login {
        color: #FFFFFF;
        padding-top: 5px;
        text-align: left;
    }
    .button_login {
        background: url("adagps.com/images_button1.png") no-repeat scroll center center rgba(0, 0, 0, 0);
        cursor: pointer;
    }
    .login_icon_strong {
        color: #050505;
        font-family: Arial;
    }
    .tbl_login_icon_content a {
        color: #666666;
        text-decoration: none;
    }
    .login_phone {
        color: #B1B1B1;
    }
    .login_phone_magiwan {
        color: #FF7D00;
    }
    #login_button_a a:hover, #login_button_a a:focus {
        color: #B1B1B1;
    }
    .button_login {
        background: url("adagps.com/images/Login_button3.png") no-repeat scroll center center rgba(0, 0, 0, 0);
        border: medium none;
        height: 25px;
        width: 85px;
    }


</style>
<script src='adagps.com/images/jquery.js'></script>
</head>
<body>


<div align="center">
<div class="dv_main">
<div class="dv_main_header">
    <embed width="100%" height="150" scale="" wmode="transparent" allowscriptaccess="sameDomain"
           quality="high" bgcolor="#ffffff" src="adagps.com/images/banner/banner.png" type="application/x-shockwave-flash">
</div>
<div class="dv_main_menu">
    <div class="dv_main_menu_list">
        <table cellspacing="0" cellpadding="0" border="0">
            <tbody>
            <tr>
                <td width="65px" class="menu_item border_right_magiwan text_left">
                    <a class="none_underline" name="m001" id="m001" href="index.php" style="color: rgb(255, 125, 0);">
                        Đăng nhập</a>
                </td>
                
                                 
                <td width="120px" class="menu_item border_right_magiwan">
                    <a class="none_underline" name="m004" id="m004" href="javascript:LoadAjax('?mid=m004&m=login_terms')">Điều
                        khoản sử dụng</a>
                </td>
                
                <td width="95px" class="menu_item border_right_magiwan">
                    <a class="none_underline" name="m003" id="m003" href="javascript:LoadAjax('?mid=m003&m=other_product')">
                        Sản phẩm khác</a>
                    <script type="text/javascript">
                        function LoadAjax(para) {
                            $.ajax({
                                type: "POST",
                                url: "index.php" + para,
                                data: { name: "John", location: "Boston" }
                            })
                                    .done(function (msg) {
                                        // alert( "Data Saved: " + msg );
                                        $('.dv_main_body').html(msg);
                                    });
                        }
                    </script>
                </td>
                <td width="90px" class="menu_item border_right_magiwan">
                    <a class="none_underline" name="m005" id="m005" href="javascript:LoadAjax('?mid=m005&m=login_contact')">
                        Ý kiến phản hồi</a>
                </td>
                <!--                <td width="60px" class="menu_item">-->
                <!--                    <a class="none_underline" name="m006" id="m006" href="?mid=m006&amp;m=login_complain">-->
                <!--                        Khiếu nại</a>-->
                <!--                </td>-->
            </tr>
            </tbody>
        </table>
    </div>
    <div class="dv_main_menu_lang">
        <img onclick="javascript:chang_lang_vi();" title="Việt Nam" alt="Vietnamese" class="image_flag"
             src="adagps.com/images/flag_vn.png">
        <img title="English" alt="English" class="image_flag" onclick="javascript:chang_lang();"
             src="adagps.com/images/flag_en.png">
    </div>
</div>
<div class="clear_both dv_main_body">
<style>
    #login111{
        background:url('adagps.com/images/bglogin_magiwan.png') no-repeat ;
        background-image:url(adagps.com/images/bglogin_magiwan.png);
        background-position: center top;
        /*text-decoration: none;
        color: #666; */
        margin: auto;
    }

    #login_title{
        font-size: 17px;
        color: #f15c22;
        font-family: Arial;
        font-weight: bold;
    }
    #support_title{
        font-size: 14px;
        color:#ff7d00;
        font-weight: bold;
    }
    .support_sub_title{
        font-size: 11px;
        color: #828382;
        font-weight: bold;
    }
    .support_add_title{
        font-size: 10px;
        color: #828382;
        font-weight: bold;
    }
    .submenu_title{
        font-size: 15px;
        font-weight: bold;
    }
    .tbl_login{
        color: #FFFFFF;
        padding-top: 5px;
        text-align: left;;
    }
    .button_login{
        background:url('adagps.com/images_button1.png') no-repeat;
        background-position: center;
        background-color: transparent;
        border:0px 0px 0px 0px ;
        cursor: pointer;
    }
    .login_icon_strong{
        font-family:Arial  ;
        color:#050505  ;
    }
    .tbl_login_icon_content a{
        color:#666;
        text-decoration: none;
    }
    .login_phone{
        color:#b1b1b1 ;
    }
    .login_phone_magiwan{
        color:#ff7d00 ;
    }
    #login_button_a a:hover,  #login_button_a a:focus{
        color:#b1b1b1; /**/
    }
    .button_login{
        background:url('adagps.com/images/Login_button3.png') no-repeat;
        background-position: center;
        background-color: transparent;
        border: none;
        width:85px ;
        height:25px;
    }
    .clsnote{
        color: #B8BCBF;
    }
</style>
<form method="post" name="frmLogin" id="frmLogin" action="index.php">
<table width="100%" height="100%" border="0" class="tbl_main_login">
<tbody>
<tr>
<td width="70%" valign="top" align="left">
    <table width="100%" height="100" border="0" align="left" class="tbl_login_icon_content"
           style="text-align: left;">
        <tbody>
        <tr>
            <td align="left" style="text-align: left;" colspan="4">
                                                Là hệ thống quản lý phòng chiếu phim(HD,3D...) theo hình thức ONLINE. Giúp quản lý, giám sát công việc kinh doanh của bạn mọi lúc mọi nơi.
                                                Quản lý kho hàng, sản phẩm nhập tồn, giảm thiểu thất thoát tăng hiệu quả kinh doanh.
                                                Tính tiền giờ linh hoạt theo tùy chọn của người dùng (từng giờ trong ngày, từng ngày trong tuần) .
                                                                <span class="clsnote"> Sử dụng MSSMOVIE bạn sẽ được :</span></td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td width="5%" align="right">
                <img width="30" height="27" src="adagps.com/images/quanlygiamsat.png">
            </td>
            <td align="left">
                <strong class="login_icon_strong">Quản lý chặt chẽ, mọi lúc mọi nơi</strong>
                <br>
                <span class="clsnote"> 
                - Quản lý giờ máy chiếu.<br>                                
                - Quản lý thu chi. <br>
                - Quản lý xuất, nhập, tồn kho. <br>
                </span>                
                &nbsp;
            </td> 
            <td width="5%" align="right">
                <img width="30" height="27" src="adagps.com/images/caitiendichvu.png">
            </td>
            <td align="left">
                <strong class="login_icon_strong">Chi phí hợp lý, giảm rủi ro người kinh doanh</strong>
                <br>
                <span class="clsnote"> 
                - Trả phí theo tháng. <br/>
                - Không tốn chi phí đầu tư phần mềm.<br/>
                - Bảo mật thông tin.<br/>
</span>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="left">
                <img width="30" height="27" src="adagps.com/images/giamsatdienthoai.png">
            </td>
            <td align="left">
                <strong class="login_icon_strong">Dễ dàng sử dụng, không cài đặt </strong>
                <br>
                <span class="clsnote"> 
                - Màn hình trực quan, thân thiện <br/>
                - Không cần cài đặt, chỉ cần có tài khoản. <br/>
                - Sử dụng được trên nhiều máy.<br/> 
                </span>
                 &nbsp;
            </td>  
            <td align="left">
                <img width="30" height="27" src="adagps.com/images/sanpham.png">
            </td>
            <td align="left">
                <strong class="login_icon_strong">Quảng cáo trực tuyến dịch vụ trên msspro</strong>
                <br> <span class="clsnote">
                - Tích hợp bản đồ google maps.<br>
                - Tăng lợi thế cạnh tranh cho doanh nghiệp của bạn.<br>
                - Hệ thống đặt phòng qua mạng.<br>
                </span> 
                &nbsp; 
            </td>
        </tr>
        <tr>
            <td align="left">
                <img width="30" height="27" src="adagps.com/images/dichvu247.png">
            </td>
            <td align="left">
                <strong class="login_icon_strong">Dịch vụ 24/7</strong>
                <br>
                <span style="color: #b1b1b1;">Hỗ trợ kỹ thuật , Hotline</span>
            </td> 
            <td>
            </td>
            <td>
            </td>
        </tr>
        
        <tr style="display: none" id="trnotice">
            <td align="left" colspan="4">

            </td>
        </tr>
        
                 </tbody>
    </table>

    <table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" style="display: none">
        <tbody>
        <tr id="trnotice">
            <td align="left">
                <br>
                <img width="32" height="32" src="adagps.com/images/warning32.png"><font size="-1" color="red"
                                                                                        style="text-decoration: blink;"> <b>&nbsp; </b></font>
            </td>
        </tr>
        </tbody>
    </table>
</td>
<td valign="top" height="299" align="center" id="login111" class="login111">

    <table width="70%" border="0" class="tbl_login">
        <tbody>
        <tr>
            <td align="center">
                <img height="36" border="0" src="adagps.com/images/chuonchuon.png">
                <font size="3"><b>&nbsp;Đăng Nhập</b></font>
            </td>
        </tr>
        <tr>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                Tên đăng nhập
            </td>
        </tr>
        <tr>
            <td>
                <?php
                $cookie_user = isset($_COOKIE["adagps_user"]) ? $_COOKIE["adagps_user"]:"";
                $cookie_pass = isset($_COOKIE["adagps_pass"])  ? $_COOKIE["adagps_pass"]:"";
                $cookie_auto = isset($_COOKIE["adagps_auto"])   ? $_COOKIE["adagps_auto"]:"";
                $cookie_remember = isset($_COOKIE["adagps_remember"]) ? $_COOKIE["adagps_remember"]:"";
                ?>
                <input type="text" onkeydown="if (event.keyCode == 13) return login_click();" value="<?php echo $cookie_user ?>"
                       style="width: 100%; height: 14px;" name="txtUserNameLogin" id="txtUserNameLogin">
            </td>
        </tr>
        <tr>
            <td>
                Mật khẩu
            </td>
        </tr>
        <tr>
            <td>
                <input type="password" onkeydown="if (event.keyCode == 13) return login_click();"
                       value="" style="width: 100%; height: 14px;" name="txtPasswordLogin" id="txtPasswordLogin">


            </td>
        </tr>
        <tr>
            <td>
                <input type="checkbox" name="chkRemember" id="chkRemember" onkeydown="if (event.keyCode == 13) return login_click();"
                       value="1">  <label for="chkRemember"> Nhớ mật khẩu</label>

            </td>
        </tr>
        <tr>
            <td>
                <div style="display: none">
                    <input type="checkbox" name="chkAutoLogin" id="chkAutoLogin" onkeydown="if (event.keyCode == 13) return login_click();"
                           value="1">Tự động đăng nhập</div>

                <script type="text/javascript">

                    document.getElementById('txtPasswordLogin').value='<?php echo $cookie_pass ?>';
                    var ischeck =<?php echo $cookie_remember ?>;
                    if(ischeck==1)
                    {

                        document.getElementById('chkRemember').checked=true;
                    }
                    var isAuto =<?php echo $cookie_auto ?>;

                    if(isAuto==1)
                    {

                        //document.getElementById('chkAutoLogin').checked=true;
                        //login_click();
                    }


                </script>
            </td>
        </tr>
        <tr>
            <td align="center" id="login_button_a">
                <br/>

                <input type="button" onclick="login_click();" class="button_login">
                <!--<img src="adagps.com/images/Login_button3.png" style="cursor:pointer"  onclick="login_click()"/>-->
            </td>
        </tr>
        </tbody>
    </table> 
    Khuyến cáo nên dùng trình duyệt chrome (<a href='http://www.google.com/intl/vi/chrome/'  target=_blank title='Download trình duyệt chrome'>download</a> ) hoặc Firefox(<a href='http://www.mozilla.org/vi/firefox/new/' target=_blank title='Download trình duyệt Firefox'>download</a> )
</td>
</tr>
<tr>
    <td align="left" colspan="2" id="support_title">
        Hỗ trợ trực tuyến
    </td>
</tr>
<tr>
    <td valign="top" colspan="2">
        <table width="100%" border="0">
            <tbody>
            <tr>
                <td width="35%" align="left" class="support_sub_title" colspan="4">
                    Kỹ thuật
                </td>
                <td width="35%" align="left" colspan="3" class="support_sub_title">
                    Kinh doanh
                </td>
                <td width="30%" class="support_sub_title">
                    HotLine
                </td>
            </tr>
            <tr>
                <td width="6%" class="support_add_title">
                    <a href="ymsgr:sendIM?msspro_hotro">
                        <img border="0" align="top" src="http://opi.yahoo.com/online?u=msspro_hotro&amp;m=g&amp;t=1">
                    </a>
                </td>
                <td width="3%">
                    <img src="adagps.com/images/icondienthoai.png">
                </td>
                <td align="left" class="login_phone">
                    &nbsp;(+84) 989.758.864 
                </td>
                <td width="6%" class="support_add_title">
                    Tp.HCM
                </td>
                <td width="8%">
                    <a href="ymsgr:sendIM?msspro_kinhdoanh">
                        <img border="0" align="top" src="http://opi.yahoo.com/online?u=msspro_kinhdoanh&amp;m=g&amp;t=1">
                    </a>
                </td>
                <td width="3%">
                    <img src="adagps.com/images/icondienthoai.png">
                </td>
                <td align="left" class="login_phone">
                    &nbsp;(+84) 988.667.113 
                </td>
                <td class="login_phone_magiwan">
                    0988 667 113
                </td>
            </tr>
            </tbody>
        </table>
    </td>
</tr>
</tbody>
</table>
<input type="hidden" value="login" name="hide_method">
<input type="hidden" value="default" name="ref_url">
<input type="hidden" value="" name="ref_id">
<input type="hidden" value="" name="ref_cat">
<input type="hidden" value="login" name="action">
</form>
<!--<link type="text/css" rel="stylesheet" href="styles/popup.css">
<script type="text/javascript" src="scripts/popup.js"></script>
<div id="popupContact" style="display: none; height: 400px; width: 800px;"><div><a id="popupContactClose" href="javascript:;" title="Đóng"><img src="http://www.magiwan.com/images/close.png" alt="Đóng"></a></div><a title="Nhấn vào để xem chi tiết" href="http://www.j610.vn/news.aspx" target="_blank"><img src="http://www.magiwan.com/images/ads/p20121029_new.png" alt="Khuyến mãi J610"></a></div>
<div id="backgroundPopup" style="opacity: 0.7; display: none; "></div>-->
<script language="javascript">


    function login_click() {
        var user = $.trim($("#txtUserNameLogin").val());
        var pass = $.trim($("#txtPasswordLogin").val());
        if (user == '') {
            alert("Vui lòng nhập tên đăng nhập.");
            document.getElementById("txtUserNameLogin").focus();
            return false;
        }
        if (pass == '') {
            alert("Vui lòng nhập mật khẩu.");
            document.getElementById("txtPasswordLogin").focus();
            return false;
        }
        //  $("#txtUserNameLogin").val(user);
        //  document.frmLogin.action = "index.php?m=login";
        document.frmLogin.submit();
        // document.getElementById("txtUserNameLogin").focus() ;
    }
    document.getElementById("txtUserNameLogin").focus();
    function toggle(name) {
        document.getElementById(name).checked = false;
    }

</script>
</div>
<div class="dv_main_footer">
    <div class="dv_main_footer_l dv_main_footer_g">
        <span style="color: #999;">@2013 MSSPRO - www.msspro.vn</span>
    </div>
    <!--<div class="dv_main_footer_r dv_main_footer_g">
        <table cellspacing="0" cellpadding="0" border="0" align="right">
            <tbody>
            <tr>
                <td width="65" class="menu_item border_right">
                    <a class="none_underline" onclick="openNewPage('http://ada.com.vn/index.php/THIET-BI-GIAM-SAT-HANH-TRINH-XE/View-all-products.ADA.html'); return false;"
                       href="#">Sản phẩm</a>
                </td>
                <td width="60" class="menu_item border_right">
                    <a class="none_underline" onclick="openNewPage('http://ada.com.vn/index.php/UNG-DUNG-GPS/dragonfly-giai-phap-dieu-hanh-van-tai.ADA.html'); return false;"
                       href="#">Giải pháp</a>
                </td>
                <td width="55" class="menu_item">
                    <a class="none_underline" onclick="openNewPage('http://ada.com.vn/index.php/LIEN-HE/Contacts/'); return false;"
                       href="#">Liên hệ</a>
                </td>
                <td width="55" class="menu_item">
                    <a class="none_underline" onclick="openNewPage('http://ada.com.vn/index.php/LIEN-HE/Contacts/'); return false;"
                       href="#">Khiếu nại</a>
                </td>

            </tr>
            </tbody>
        </table>
    </div>-->
</div>
</div>
</div>
<!--<div class="adslider">
<table width="100%" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff">
    <tr>
        <td align="center" valign="middle" width="50" style="text-align: center; vertical-align: middle;">
            <a id="atoggler" href="javascript:void(0)" onclick="showHideAds();" title="Ẩn">
                <img id="toggler" width="20" src="adagps.com/images/slide-in.png" alt="Ẩn" />
            </a>
        </td>
        <td align="center" valign="middle" width="310" style="text-align: center; vertical-align: middle;">
            <object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=7,0,2,0" width="310" height="150" allowscriptaccess="sameDomain">
                <param name="wmode" value="transparent" />
                <param name="allowscriptaccess" value="sameDomain" />
                <param name="src" value="adagps.com/images/banner/440x180_new.swf" />
                <embed src="adagps.com/images/banner/440x180_new.swf" pluginspage="http://www.macromedia.com/shockwave/download/" width="310" height="150" bgcolor="#ffffff" wmode="transparent" type="application/x-shockwave-flash" allowscriptaccess="sameDomain"></embed>
            </object>
            <a href="http://www.j610.vn" target="_blank" title="Click để xem chi tiết">
                <img src="http://www.j610.vn/img/310x150.png" alt="Khuyến mãi J610" border="0" width="310" height="150" />
            </a>
        </td>
    </tr>
</table>
</div>-->
<script language="javascript">
    /*function showHideAds() {
    if($('.adslider').css('right') == '0px') {
    $('.adslider').animate({"right": "-310px"}, "slow");
    //$('.adslider').css('right', -310);
    $('#toggler').attr('src', 'images/slide-out.png');
    $('#toggler').attr('alt', 'Hiện');
    $('#atoggler').attr('title', 'Hiện');
    } else {
    $('.adslider').animate({"right": "0px"}, "slow");
    //$('.adslider').css('right', 0);
    $('#toggler').attr('src', 'images/slide-in.png');
    $('#toggler').attr('alt', 'Ẩn');
    $('#atoggler').attr('title', 'Ẩn');
    }
    }
    */

    if (document.getElementById('m001')) {
        //document.getElementById('m001').style.fontWeight = 'bold';
        $("#m001").css("color", "#ff7d00");
    }
    function openNewPage(url) {
        window.open(url);
    }
    function chang_lang() {
        window.location.href = "index.php?mid=m001&amp;m=login&amp;lang=en";
    }
    function chang_lang_vi() {
        window.location.href = "index.php?mid=m001&amp;m=login&amp;lang=vi";
    }
</script>

</body>
</html>


